import request from "@/utils/request";
import { ParseData } from "@/utils/utils";

//获取项目信息发布列表分页
export const GetDeployList = (data: any) => {
  return request({
    method: "GET",
    url: `/xiangmuxinxifabu?${ParseData(data)}`,
  });
};
// 项目信息发布上下架
export const ChangeDeployStatus = (data: any) => {
  return request({
    method: "PUT",
    url: `/xiangmuxinxifabu/shangjia/${data.id}`,
  });
};
// 项目信息发布信息
export const GetDeploy = (data: any) => {
  return request({
    method: "GET",
    url: `/xiangmuxinxifabu/${data.id}`,
  });
};
// 项目选择信息
export const GetProjectSelect = (data: any) => {
  return request({
    method: "GET",
    url: `/xiangmu/xuanze`,
  });
};
// 项目信息发布详情信息
export const GetDeployDetail = (data: any) => {
  return request({
    method: "GET",
    url: `/xiangmuxinxifabu/xiangqing/${data.id}`,
  });
};
// 项目信息发布新增
export const AddDeploy = (data: any) => {
  return request({
    method: "POST",
    url: `/xiangmuxinxifabu`,
    data,
  });
};
// 项目信息发布编辑
export const EditDeploy = (data: any) => {
  return request({
    method: "PUT",
    url: `/xiangmuxinxifabu`,
    data,
  });
};
// 项目信息发布审核
export const ReviewDeploy = (data: any) => {
  return request({
    method: "PUT",
    url: `/xiangmuxinxifabu/shenhe`,
    data,
  });
};

